﻿using System;
using System.Globalization;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using SmartFramework.Core.Plugin.Pages;
using SmartFramework.Core.Utils;

namespace SmartFramework.System {
	public class Default  : BasicPage
	{
		private TextBox txtName;
		protected override void InitForm(HtmlForm form)
		{
			txtName = new TextBox();
			var lblName = new Label{Text = "User Name:"};
			var txtPwd = new HtmlInputPassword();
			var lblPwd = new Label {Text = "Pass Word:"};
			form.Controls.Add(lblName);
			form.Controls.Add(txtName);
			form.Controls.Add(lblPwd);
			form.Controls.Add(txtPwd);
			var btn = new Button {Text = "OK"};
			btn.Click += OnClick;

			form.Controls.Add(new LiteralControl("<a href=\"Abcs/ShowChange.aspx\">点我</a>"));
			form.Controls.Add(btn);

			var btnSubmit = new Button { Text = "Submit" };
			form.Controls.Add(btnSubmit);

			form.Controls.Add(new LiteralControl("当前目录是："+FS.GetCurrentDirectory()));
		}
		private void OnClick(object sender ,EventArgs args)
		{
			Response.Redirect(@"/PageTools.aspx");
			txtName.Text = "DCRIORI";
		}

	}
}
